package Dao;

import java.sql.SQLException;
import java.util.List;

import entity.User;
import entity.Word;

public interface UserDao {
	
	/**
	 * Title: getUser 
	 * Description: 通过用户名密码类型获取用户
	 * @author  刘嘉龙
	 */
	public User getUser(String email, String password) throws Exception;

	
	/**
	 * Title: findByemail
	 * Description: 通过email获取用户
	 * @author 刘嘉龙
	 */
	public User findByemail(String email) throws Exception;
	
	/**
	 * Title: add
	 * Description: 添加(注册)用户
	 * @author 刘嘉龙
	 */
	public Integer add(User u) throws Exception;
	
	/**
	 * Title: getUserList
	 * Description: 获取用户列表
	 * @author 刘嘉龙
	 */
	public List<User> getUserList() throws Exception;
	
	/**
	 * Title: remove
	 * Description: 删除用户
	 * @author 刘嘉龙
	 */
	public void remove(String email) throws SQLException;
	
	/**
	 * Title: update
	 * Description: 修改用户
	 * @author 刘嘉龙
	 */
	boolean update(User u) throws Exception;
	/**
	 * Title:updateGrade
	 * Description: 提升等级   
	 * @author 刘嘉龙
	 */
	public void updateGrade(String email) throws Exception;
	

}
